//
//  ZLQSecondPageCell.swift
//  GoTravel
//
//  Created by lanou3g on 16/3/9.
//  Copyright © 2016年 SHH. All rights reserved.
//

import UIKit

class ZLQSecondPageCell: UITableViewCell {

    var nameImage:UIImageView?
    var nameL:UILabel?
    var numberL:UILabel?
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        nameImage = UIImageView(frame: CGRectMake(0,0,self.contentView.frame.size.width,self.contentView.frame.size.height))
//        nameImage?.backgroundColor = UIColor.whiteColor()
        self.addSubview(nameImage!)
        
        nameL = UILabel(frame: CGRectMake(0,self.contentView.frame.size.height*0.3,self.contentView.frame.size.width,self.contentView.frame.size.height*0.2))
        nameL?.text = "必做之事"
        nameL?.font = UIFont.systemFontOfSize(19)
        nameL?.shadowColor = UIColor.blackColor()
        nameL?.shadowOffset = CGSizeMake(0.5, 0.5)
        nameL?.textColor = UIColor.whiteColor()
        nameL?.textAlignment = .Center
        nameImage!.addSubview(nameL!)
        
        numberL = UILabel(frame: CGRectMake(0,self.contentView.frame.size.height*0.5,self.contentView.frame.size.width,self.contentView.frame.size.height*0.2))
        numberL?.text = "13条旅行灵感"
        numberL?.shadowColor = UIColor.blackColor()
        numberL?.font = UIFont.systemFontOfSize(14)
        numberL?.shadowOffset = CGSizeMake(0.7, 0.7)
        numberL?.textColor = UIColor.whiteColor()
        numberL?.textAlignment = .Center
        nameImage!.addSubview(numberL!)
        
        
        
    }

    override func layoutSubviews() {
        super.layoutSubviews()
        
        nameImage?.frame = CGRectMake(0,0,self.contentView.frame.size.width,self.contentView.frame.size.height)
        nameL?.frame = CGRectMake(0,self.contentView.frame.size.height*0.3,self.contentView.frame.size.width,self.contentView.frame.size.height*0.2)
        numberL?.frame = CGRectMake(0,self.contentView.frame.size.height*0.5,self.contentView.frame.size.width,self.contentView.frame.size.height*0.2)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }


    override func setSelected(selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
